Create a MySQL database for the application (I named it ci_shoutbox), then run the following SQL commands to set up the database table, and insert some dummy data:
CREATE TABLE `shouts` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `message` text NOT NULL, PRIMARY KEY (`id`) ); INSERT INTO `shouts` (`id`,`name`,`email`,`message`) VALUES (1,'Dan Harper','email@example.com','Hello, World!'), (2,'Bob','a@a.com','This looks great!'), (3,'Dan Harper','email@example.com','Hey, thanks for the comment!');
In the shoutbox folder, enter your database details into /system/application/config/database.php:
$db['default']['hostname'] = "localhost"; $db['default']['username'] = "root"; $db['default']['password'] = "password"; $db['default']['database'] = "ci_shoutbox";
Then inside config.php, enter the URL to your application – include the trailing slash!
$config['base_url'] = "http://localhost/shoutbox/";